-- skill_double
-- created by xinj
-- 技能概率双倍效果

return {
    apply = function(prop, baseValue)
        return prop[3];
    end,

    -- 触发
    trigger = function(who, prop, arg)
        if who.type ~= OBJECT_TYPE_USER then
            return 0;
        end

        if type(arg) ~= "number" then
            return 0;
        end

        -- 不满足概率
        if DungeonM.getRandSeed("skill_double") % 1000 >= prop[3] then
            return 0;
        end

        return arg;
    end,

    record = function(target, prop, path)
        return false;
    end
};
